// const fs = require('fs')
//导入路径模块
const path = require('path')

// fs.readFile('./第一天/files/test.txt', 'utf-8', (err, dataStr) => {
//   err ? console.log(err) : console.log(dataStr)
// })

// console.log(__dirname)

// fs.readFile(__dirname + '/files/test.txt', 'utf-8', (err, dataStr) => {
//   err ? console.log(err) : console.log(dataStr)
// })
// const pathStr = path.join('/a', '/b/c', '../', './d', 'e')
// const pathStr1 = path.join(__dirname, './files/test.txt')
// console.log(pathStr1)

const fpath = '/a/b/c/index.html'

// const fileName = path.basename(fpath, '.html')

// console.log(fileName)

const extName = path.extname(fpath)

console.log(extName)
